package com.ffcs.web.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ffcs.web.model.dto.DirectionResponse;
import com.ffcs.web.model.entity.Direction;
import com.ffcs.web.services.DirectionService;

/**
 * 领域相关控制器
 * @author Administrator
 *
 */
@Controller
public class DirectionController {

	@Autowired
	private DirectionService directionService;
	
	@RequestMapping("getDirection")
	@ResponseBody
	public DirectionResponse getDirection(){
		DirectionResponse directionResponse=new DirectionResponse();
		
		List<Direction> directionList=directionService.getDirection();
		directionResponse.setDirectionList(directionList);
		directionResponse.setResultCode("0");
		directionResponse.setResultDesc("success");
		return directionResponse;
	}
}
